<extend name="Base/common"/>

<block name="style">
    <link href="__CSS__/shops.css" rel="stylesheet" type="text/css"/>
</block>

<block name="body">
    {:W('Common/SubMenu/render',array($sub_menu,$current,'商城',''))}
    <div class="container">
        <div class="row shop">
            <div class="col-md-12 clearfix">
                <div class="col-md-12 common_block_border pad_15">
                    <h2 class="title_content" style="border-bottom: 1px solid #E9E9E9;">我的订单 </h2>
                    <div class="not_nav_bar">
                    <ul class="nav_list clearfix" style="margin-bottom: 20px;">
                        <li>
                            <a href="{:U('myGoods',array('status'=>'0'))}" style="padding: 3px 0;"
                            <eq name="status" value="0">class="current"</eq>
                            >未完成订单</a>
                        </li>
                        <li>
                            <a href="{:U('myGoods',array('status'=>'1'))}" style="padding: 3px 0;"
                            <eq name="status" value="1">class="current"</eq>
                            >已完成订单</a>
                        </li>
                    </ul>
                    </div>
                    <volist name="contents" id="vo">
                        <div class="col-lg-3 col-md-4  goods">
                            <div class="item_goods position_re">
                                <if condition="$vo['goods']['sell_num'] egt $hot_num"><i class="ico_hot"></i>
                                    <else/>
                                    <if condition="$vo['goods']['is_new'] eq 1"><i class="ico_new"></i></if>
                                </if>
                                <dl>
                                    <dt>
                                        <a href="{:U('Shop/Index/goodsDetail',array('id'=>$vo['goods']['id']))}">
                                            <img class="img-responsive" src="{$vo.goods.goods_ico|getThumbImageById=222,222}">
                                        </a>
                                    </dt>
                                    <dd>
                                        <div class="left" style="width: 140px">
                                            <a class="text-more color_33"
                                               href="{:U('Shop/Index/goodsDetail',array('id'=>$vo['goods']['id']))}"
                                               style="width: 100%;">
                                                <font title="{$vo.goods.goods_name|op_t}">{$vo.goods.goods_name}</font>
                                            </a>
                                        </div>
                                        <div class="right" style="color: #d61f39;"><a><font title="所需{$tox_money_name}"><i class="ico_to_money"></i>&nbsp;{$vo.goods.tox_money_need}</font></a></div>
                                        <div class="clearfix"></div>
                                    </dd>
                                    <dd class="color_84 font_s_14">
                                        <div class="left" style="font-size: 14px;line-height: 22px;">
                                            库存：{$vo.goods.goods_num}
                                        </div>
                                        <div class="right" style="font-size: 14px;line-height: 22px;">
                                            <eq name="status" value="1">
                                                完成时间：{:date('Y-m-d',$vo['gettime'])}
                                                <else/>
                                                购买时间：{:date('Y-m-d',$vo['createtime'])}
                                            </eq>

                                        </div>
                                    </dd>
                                    <div class="clearfix"></div>
                                </dl>
                            </div>
                        </div>
                    </volist>
                    <if condition="count($contents) eq 0">
                        <php>
                            switch($status){
                            case '0':
                            $select_name='等待发货';
                            break;
                            case '1':
                            $select_name='已完成';
                            break;
                            default:
                            $select_name='等待发货';
                            }
                        </php>
                        <div style="font-size:3em;padding:2em 0;color: #ccc;text-align: center">
                            你还没有{$select_name}的交易呦！。O(∩_∩)O~
                        </div>
                    </if>
                </div>
            </div>
            <div class="pull-right">
                {:getPagination($totalPageCount,16)}
            </div>


        </div>
    </div>
</block>
<block name="script">
    <script>
        $(function () {
            $('.item_goods').mouseover(function () {
                $(this).addClass('item_goods_box_shadow');
            });
            $('.item_goods').mouseleave(function () {
                $(this).removeClass('item_goods_box_shadow');
            });
        });
    </script>

</block>
